module ProjectsHelper
  USER_ROLES = {"owner" => "Owner", "admin" => "Admin", "viewer" => "Viewer"}
  USER_ROLES_LABEL = {"owner" => "label-info", "admin" => "label-primary", "viewer" => "label-success"}
  
  def user_role_text(role)
    USER_ROLES[role]
  end
  
  def user_role_label(role)
    USER_ROLES_LABEL[role]
  end
  
  def is_admin(role)
    (role != "viewer")
  end
end
